Optimal. Leaf size=117 \[ -\frac {i (c+d x) \text {ArcTan}\left (e^{i (a+b x)}\right )}{b}+\frac {i d \text {PolyLog}\left (2,-i e^{i (a+b x)}\right )}{2 b^2}-\frac {i d \text {PolyLog}\left (2,i e^{i (a+b x)}\right )}{2 b^2}-\frac {d \sec (a+b x)}{2 b^2}+\frac {(c+d x) \sec (a+b x) \tan (a+b x)}{2 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 117, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {4270, 4266,
2317, 2438} \begin {gather*} -\frac {i (c+d x) \text {ArcTan}\left (e^{i (a+b x)}\right )}{b}+\frac {i d \text {Li}_2\left (-i e^{i (a+b x)}\right )}{2 b^2}-\frac {i d \text {Li}_2\left (i e^{i (a+b x)}\right )}{2 b^2}-\frac {d \sec (a+b x)}{2 b^2}+\frac {(c+d x) \tan (a+b x) \sec (a+b x)}{2 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2317
Rule 2438
Rule 4266
Rule 4270
Rubi steps
\begin {align*} \int (c+d x) \sec ^3(a+b x) \, dx &=-\frac {d \sec (a+b x)}{2 b^2}+\frac {(c+d x) \sec (a+b x) \tan (a+b x)}{2 b}+\frac {1}{2} \int (c+d x) \sec (a+b x) \, dx\\ &=-\frac {i (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {d \sec (a+b x)}{2 b^2}+\frac {(c+d x) \sec (a+b x) \tan (a+b x)}{2 b}-\frac {d \int \log \left (1-i e^{i (a+b x)}\right ) \, dx}{2 b}+\frac {d \int \log \left (1+i e^{i (a+b x)}\right ) \, dx}{2 b}\\ &=-\frac {i (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {d \sec (a+b x)}{2 b^2}+\frac {(c+d x) \sec (a+b x) \tan (a+b x)}{2 b}+\frac {(i d) \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{2 b^2}-\frac {(i d) \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{2 b^2}\\ &=-\frac {i (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {i d \text {Li}_2\left (-i e^{i (a+b x)}\right )}{2 b^2}-\frac {i d \text {Li}_2\left (i e^{i (a+b x)}\right )}{2 b^2}-\frac {d \sec (a+b x)}{2 b^2}+\frac {(c+d x) \sec (a+b x) \tan (a+b x)}{2 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(389\) vs. \(2(117)=234\).
time = 2.42, size = 389, normalized size = 3.32 \begin {gather*} \frac {c \tanh ^{-1}(\sin (a+b x))}{2 b}+\frac {d \left (\left (-a+\frac {\pi }{2}-b x\right ) \left (\log \left (1-e^{i \left (-a+\frac {\pi }{2}-b x\right )}\right )-\log \left (1+e^{i \left (-a+\frac {\pi }{2}-b x\right )}\right )\right )-\left (-a+\frac {\pi }{2}\right ) \log \left (\tan \left (\frac {1}{2} \left (-a+\frac {\pi }{2}-b x\right )\right )\right )+i \left (\text {PolyLog}\left (2,-e^{i \left (-a+\frac {\pi }{2}-b x\right )}\right )-\text {PolyLog}\left (2,e^{i \left (-a+\frac {\pi }{2}-b x\right )}\right )\right )\right )}{2 b^2}+\frac {d x}{4 b \left (\cos \left (\frac {a}{2}+\frac {b x}{2}\right )-\sin \left (\frac {a}{2}+\frac {b x}{2}\right )\right )^2}-\frac {d \sin \left (\frac {b x}{2}\right )}{2 b^2 \left (\cos \left (\frac {a}{2}\right )-\sin \left (\frac {a}{2}\right )\right ) \left (\cos \left (\frac {a}{2}+\frac {b x}{2}\right )-\sin \left (\frac {a}{2}+\frac {b x}{2}\right )\right )}-\frac {d x}{4 b \left (\cos \left (\frac {a}{2}+\frac {b x}{2}\right )+\sin \left (\frac {a}{2}+\frac {b x}{2}\right )\right )^2}+\frac {d \sin \left (\frac {b x}{2}\right )}{2 b^2 \left (\cos \left (\frac {a}{2}\right )+\sin \left (\frac {a}{2}\right )\right ) \left (\cos \left (\frac {a}{2}+\frac {b x}{2}\right )+\sin \left (\frac {a}{2}+\frac {b x}{2}\right )\right )}+\frac {c \sec (a+b x) \tan (a+b x)}{2 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 266 vs. \(2 (98 ) = 196\).
time = 0.09, size = 267, normalized size = 2.28
method | result | size |
risch | \(-\frac {i \left (d x b \,{\mathrm e}^{3 i \left (b x +a \right )}+b c \,{\mathrm e}^{3 i \left (b x +a \right )}-d x b \,{\mathrm e}^{i \left (b x +a \right )}-b c \,{\mathrm e}^{i \left (b x +a \right )}-i d \,{\mathrm e}^{3 i \left (b x +a \right )}-i d \,{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2} \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )^{2}}-\frac {i c \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}-\frac {d \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{2 b}-\frac {d \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{2 b^{2}}+\frac {d \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{2 b}+\frac {d \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{2 b^{2}}+\frac {i d \dilog \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )}{2 b^{2}}-\frac {i d \dilog \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )}{2 b^{2}}+\frac {i d a \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}\) | \(267\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 435 vs. \(2 (93) = 186\).
time = 0.41, size = 435, normalized size = 3.72 \begin {gather*} \frac {-i \, d \cos \left (b x + a\right )^{2} {\rm Li}_2\left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - i \, d \cos \left (b x + a\right )^{2} {\rm Li}_2\left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + i \, d \cos \left (b x + a\right )^{2} {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + i \, d \cos \left (b x + a\right )^{2} {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + {\left (b c - a d\right )} \cos \left (b x + a\right )^{2} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) - {\left (b c - a d\right )} \cos \left (b x + a\right )^{2} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) + {\left (b d x + a d\right )} \cos \left (b x + a\right )^{2} \log \left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) - {\left (b d x + a d\right )} \cos \left (b x + a\right )^{2} \log \left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) + {\left (b d x + a d\right )} \cos \left (b x + a\right )^{2} \log \left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) - {\left (b d x + a d\right )} \cos \left (b x + a\right )^{2} \log \left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) + {\left (b c - a d\right )} \cos \left (b x + a\right )^{2} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) - {\left (b c - a d\right )} \cos \left (b x + a\right )^{2} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) - 2 \, d \cos \left (b x + a\right ) + 2 \, {\left (b d x + b c\right )} \sin \left (b x + a\right )}{4 \, b^{2} \cos \left (b x + a\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (c + d x\right ) \sec ^{3}{\left (a + b x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F(-1)]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \text {Hanged} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________